﻿Public Class TwoFactorSettings
    Public Sub New(ByVal pWidth As Integer, ByVal pHeight As Integer)
        InitializeComponent()

        Me.SetBounds(0, 0, pWidth, pHeight)
    End Sub

    Private m_Settings As YubiVerifier.Settings
    Public Property Settings() As YubiVerifier.Settings
        Get
            Return m_Settings
        End Get
        Set(ByVal value As YubiVerifier.Settings)
            m_Settings = value
        End Set
    End Property

    Public Sub RefreshErrors()
        txtError.Text = m_Settings.ErrorText
    End Sub

    Private Sub btnRefresh_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRefresh.Click
        RefreshErrors()
    End Sub

    Private Sub btnClear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClear.Click
        m_Settings.ClearErrors()
    End Sub
End Class
